<!DOCTYPE html>
<html>

<head>
    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
<div class="page-heade clearfix">
    <h2 class="clearfix text-center">
        <a href="{:url('cgindex')}" class="col-md-6 title_color H_right H_active"  style="display: inline-block;font-size: 16px">TI费用已核销明细查询-常规</a>
        <a href="{:url('index')}" class="col-md-6 title_color" style="color:#333;font-size: 16px;display: inline-block;">TI费用已核销明细查询-非常规和进场</a>
    </h2>
</div>
<!-- 标题 -->
<!--<div class="page-heade">
    <h1 class="title_color">TI费用已核销明细查询</h1>
</div>-->
<!-- 标题 -->
<div class="row-margin-top">
    <form action="" class="form-inline">
        <table class="row-margin-top tab-content table-bordered  table" border="1">
            <tr>
                <td><label for="" class="form-label">核销面单编号</label></td>
                <td><input type="text" class="form-control" name="hxmdbh" value="{$hxmdbh}"></td>
                <td><label for="" class="form-label">经销商名称</label></td>
                <td><input type="text" class="form-control" name="jxsmc" value="{$jxsmc}"></td>
                <td><label for="" class="form-label">网店名称</label></td>
                <td><input type="text" class="form-control" name="wdmc" value="{$wdmc}"></td>
            </tr>
            <tr>
                <td><label for="" class="form-label">品牌</label></td>
                <td><input type="text" class="form-control" name="pp" value="{$pp}"></td>
                <td><label for="" class="form-label">三级费用科目</label></td>
                <td><input type="text" class="form-control" name="sjfykm" value="{$sjfykm}"></td>
                <td><label for="" class="form-label">申请人</label></td>
                <td><input type="text" class="form-control" name="sqr" value="{$sqr}"></td>
            </tr>
            <tr>
                <td>
                    <div class="form-group">
                        申请时间
                    </div>
                </td>
                <td>
                    <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date "
                               style="width: 100px;min-width: 80px;display: inline-block;" name="start" value="{$start}">
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date"
                               style="width: 100px;min-width: 100px;display: inline-block;" id="end"
                               name="end" value="{$end}">
                    </div>
                </td>
                <td><label for="" class="form-label">支付方式</label></td>
                <td colspan="3"><input type="text" class="form-control" name="zffs" value="{$zffs}"></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query">查询</button>
                    <button class="btn btn-info emptyIf" type="button">清空查询条件</button>
                    <button class="btn btn-info LendExcel" type="button">导出Excel</button>
                </td>
            </tr>
        </table>
    </form>
    <table class="table-bordered table">
        <tr>
            <th>
                批复金额合计: <span class="font-bold ObjectNum">{$pfjehj}</span>&nbsp;&nbsp;
                未核销金额合计: <span class="font-bold ObjectNum">{$whxjehj}</span> &nbsp;&nbsp;
                未税核销金额合计: <span class="font-bold ObjectNum">{$wshxjehj}</span> &nbsp;&nbsp;
                税金核销合计: <span class="font-bold ObjectNum">{$sjhj}</span> &nbsp;&nbsp;
                含税核销金额合计: <span class="font-bold ObjectNum">{$hshxjehj}</span> &nbsp;&nbsp;
                实际核销金额合计: <span class="font-bold ObjectNum">{$sjhxjehj}</span>
            </th>
        </tr>
    </table>
    <table class="table table-striped table-bordered table-hover text-center" id="verifytable">
    <tr class="info text-center">
        <th rowspan="2" class="text-center">序号</th>
        <th rowspan="2" class="text-center">申请人</th>
        <th rowspan="2" class="text-center">核销面单编号</th>
        <th rowspan="2" class="text-center">核销明细编号</th>
        <th rowspan="2" class="text-center">申请类型</th>
        <th rowspan="2" class="text-center">原申请单号</th>
        <th rowspan="2" class="text-center">原申请明细编号</th>
        <th rowspan="2" class="text-center">经销商名称</th>
        <th rowspan="2" class="text-center">系统名称</th>
        <th rowspan="2" class="text-center">网点名称</th>
        <th rowspan="2" class="text-center">品牌</th>
        <th rowspan="2" class="text-center">品类</th>
        <th rowspan="2" class="text-center">系列</th>
        <th rowspan="2" class="text-center">SKU</th>
        <th rowspan="2" class="text-center">单品</th>
        <th rowspan="2" class="text-center">一级科目</th>
        <th rowspan="2" class="text-center">二级科目</th>
        <th rowspan="2" class="text-center">三级科目</th>
        <th rowspan="2" class="text-center">支付方式</th>
        <th colspan="3" class="text-center">实际投入</th>
        <td colspan="8" class="text-center">本次申请核销</td>

        <td rowspan="2">活动开始日期</td>
        <td rowspan="2">归档日期</td>
        <td rowspan="2">备注</td>
    </tr>
    <tr class="info">
        <th class="text-center">实际投入金额</th>
        <th class="text-center">已核销金额</th>
        <th class="text-center">未核销金额</th>
        <th class="text-center">未税核销金额</th>
        <td class="text-center">有无发票</td>
        <td class="text-center">发票号</td>
        <td class="text-center">是否增值税<br>(可抵扣)</td>
        <td class="text-center">税率</td>
        <td class="text-center">税金</td>
        <td class="text-center">含税核销金额</td>
        <td class="text-center">实际投入金额</td>
    </tr>
    <tbody>
    {volist name="data" id="row" key="k"}
    <tr>
        <td>{$k}</td>
        <td>{$row.sqr}</td>
        <td><a href="{:url('tihexiao/view',['id'=>$row.id])}" class="J_menuItem">{$row.hxmdbh}</a></td>
        <td>{$row.hxmdbh}_{$row.hxmxbh}</td>
        <td>{$row.type_title}</td>
        <td>
            {if $row.type_id==0}
            <a href="{:url('ti_apply2/view',['id'=>$row.ysqdh_id])}" class="J_menuItem">{$row.ysqdh}</a>
            {else}
            <a href="{:url('tijinchang/view',['id'=>$row.ysqdh_id])}" class="J_menuItem">{$row.ysqdh}</a>
            {/if}
        </td>
        <td>{$row.ysqdh}_{$row.ysqmxbh}</td>
        <td><a href="{:url('jxsgl/agencydetail',['id'=>$row.jxs_id])}" class="J_menuItem">{$row.jxs_title}</a></td>
        <td>{$row.system_title}</td>
        <td>{$row.net_title}</td>
        <td>{$row.brand_name}</td>
        <td>{$row.category_name}</td>
        <td>{$row.series_name}</td>
        <td>{$row.sku_name}</td>
        <td>{$row.pro_name}</td>
        <td>{$row.yjkm}</td>
        <td>{$row.ejkm}</td>
        <td>{$row.sjkm}</td>
        <td>{$row.zffs}</td>
        <td class="ObjectNum">{$row.sjtrje}</td>
        <td class="ObjectNum">{$row.yhxje}</td>
        <td class="ObjectNum">{$row.sjtrje-$row.yhxje}</td>
        <td class="ObjectNum">{$row.wshxje}</td>
        <td>{if $row.ywfp}有{else}无{/if}</td>
        <td>{if $row.fph}{$row.fph}{else}-{/if}</td>
        <td>{if $row.szzs}是{else}否{/if}</td>
        <td><span class="ObjectNum">{$row.shuilv}</span>%</td>
        <td class="ObjectNum">{$row.shuijin}</td>
        <td class="ObjectNum">{$row.hshxje}</td>
        <td class="ObjectNum">{$row.sjtrje}</td>
        <td>{:date('Y-m-d',$row.hdksrq)}</td>
        <td>{$row.gdrq}</td>
        <td>{$row.beizhu}</td>
    </tr>
    {/volist}
    </tbody>
</table>
    <h5 class="text-center">
        {$page}
    </h5>
</div>
<!-- 全局js -->
{include file="Public/footer"}
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/common.js"></script>
<script>

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    $(document).ready(function () {
        // $("#verifytable tbody tr td").find('.duigou')
        /*格式化数字金额*/
        var $ObjectNum = $(".ObjectNum");
        toNum($ObjectNum);
        /*为已生效的核销申请字体加粗*/
        var $duigou = $(".duigou");
        $duigou.parent().addClass("font-bold");

        $('.emptyIf').on('click',function () {
            $('#form1 input').each(function () {
                $(this).val('')
            })
            $('#form1 select').each(function () {
                $(this).val('')
            })
            $('#form1').submit()
        })
        $('.LendExcel').on('click',function () {
            var param = $('#form1').serialize()
            window.open('{:url("cgexcel")}?'+param)
        })
    })

</script>
</body>

</html>
